<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
<h1>{{message}}</h1>
  输入成绩1-100: <input type="text" v-model="score" v-on:blur="blur">
  <br><br>
  你当前的成绩是{{score}}
  <p v-if="score>=90">优秀</p>
  <p v-else-if="score>=70">良好</p>
  <p v-else-if="score>=60">及格</p>
  <p v-else>不及格</p>
</div>

<script src="vue.js"></script>
<script>
  let vm=new Vue({
    el:"#app",  //el:element
    data:{
      message:"演示条件判断",
      score:0
    },
    methods:{
        blur() {  //失去焦点时判断
          if (this.score>100){
            this.score=100
          }
          else if (this.score<0){
            this.score=0
          }
        }
    }
  })
</script>
</body>
</html>